{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "当前目录：D:\\testworkspace\\fmeter\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "import glob\n",
    "import copy\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "from fmeter import TransactionAnalyzer\n",
    "\n",
    "# params = {\n",
    "#     'lines.linewidth': 0.5,\n",
    "#     'font.family': \"sans-serif\",\n",
    "#     'font.sans-serif': ['Euclid'],\n",
    "#     'font.size': 7,\n",
    "#     'xtick.labelsize': 7,\n",
    "#     'ytick.labelsize': 7,\n",
    "#     'axes.grid': True,\n",
    "#     'grid.linestyle': '--',\n",
    "#     'legend.fontsize': 7,\n",
    "#     'figure.figsize': [2.3622, 2],\n",
    "#     'savefig.dpi': 600,\n",
    "#     'savefig.bbox': 'tight'\n",
    "# }\n",
    "# paramsLocal = copy.deepcopy(params)\n",
    "# paramsLocal[\"figure.figsize\"] = [6.29921, 2]\n",
    "# plt.rcParams.update(paramsLocal)\n",
    "# plt.clf()\n",
    "\n",
    "\n",
    "def loadTA(name, fpath):\n",
    "    ta = TransactionAnalyzer()\n",
    "    ta.name = name\n",
    "    ta.load(fpath)\n",
    "    return ta\n",
    "\n",
    "def loadTA4(base_path, name_prefix=None):\n",
    "    files = glob.glob(os.path.join(base_path, \"*.h5\"))\n",
    "    r = {}\n",
    "    for item in files:\n",
    "        file_basename = os.path.basename(item)\n",
    "        name = name_prefix + \"_\" + file_basename if name_prefix is not None else file_basename\n",
    "        r[name] = loadTA(name,item)\n",
    "    return r\n",
    "\n",
    "print(\"当前目录：{}\".format(os.getcwd()))\n",
    "if not \"fmeter\" in os.getcwd():\n",
    "    raise Exception(\"检查当前目录！\")\n",
    "result_path = \"./result/raft\"\n",
    "result_raft_5w = os.path.join(result_path,\"5w\")\n",
    "result_raft_10w = os.path.join(result_path,\"10w\")\n",
    "result_raft_20w = os.path.join(result_path,\"20W\")\n",
    "ta_raft_5w = loadTA4(result_raft_5w, \"raft\")\n",
    "ta_raft_10w = loadTA4(result_raft_10w, \"raft\")\n",
    "ta_raft_20w = loadTA4(result_raft_20w, \"raft\")\n",
    "\n",
    "result_path = \"./result/cfrd\" \n",
    "result_cfrd_5w = os.path.join(result_path,\"5w\")\n",
    "result_cfrd_10w = os.path.join(result_path,\"10w\")\n",
    "result_cfrd_20w = os.path.join(result_path,\"20w\")\n",
    "ta_cfrd_5w = loadTA4(result_cfrd_5w, \"cfrd\")\n",
    "ta_cfrd_10w = loadTA4(result_cfrd_10w, \"cfrd\")\n",
    "ta_cfrd_20w = loadTA4(result_cfrd_20w, \"cfrd\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'raft_server84_shimrecord_high_5.h5': <fmeter.TransactionAnalyzer object at 0x00000242192FAE08>, 'raft_server84_shimrecord_low_5.h5': <fmeter.TransactionAnalyzer object at 0x000002421AF6CB88>, 'raft_server84_shim_high_5.h5': <fmeter.TransactionAnalyzer object at 0x0000024219801348>, 'raft_server84_shim_low_5.h5': <fmeter.TransactionAnalyzer object at 0x000002421B0084C8>}\n",
      "{'cfrd_server84_shimrecord_high_5.h5': <fmeter.TransactionAnalyzer object at 0x000002421B00C548>, 'cfrd_server84_shimrecord_low_5.h5': <fmeter.TransactionAnalyzer object at 0x0000024209ACDF08>, 'cfrd_server84_shim_high_5.h5': <fmeter.TransactionAnalyzer object at 0x000002421DE85488>, 'cfrd_server84_shim_low_5.h5': <fmeter.TransactionAnalyzer object at 0x000002421D9DC888>}\n"
     ]
    }
   ],
   "source": [
    "print(ta_raft_5k)\n",
    "print(ta_cfrd_5k)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "def oneThirdTakes(ta):\n",
    "    y = ta.transaction_record_df.sort_values(\"start_time\")\n",
    "    mid_start = len(y)//3\n",
    "    print(\"start index: {}\".format(mid_start)) \n",
    "    mid_end = len(y)*2//3\n",
    "    print(\"end index: {}\".format(mid_end))\n",
    "    y2 = y.iloc[mid_start:mid_end].reset_index(drop=True)\n",
    "    y = y2[\"takes\"].dt.total_seconds()\n",
    "    print(\"mean: {}, std: {}, max: {}, min: {}\\n\".format(y.mean(), y.std(), y.max(), y.min()))\n",
    "    \n",
    "def allTakes(ta):\n",
    "    y = ta.transaction_record_df[\"takes\"].dt.total_seconds()\n",
    "    print(\"mean: {}, std: {}, max: {}, min: {}\\n\".format(y.mean(), y.std(), y.max(), y.min()))\n",
    "\n",
    "def transBlockDistribution(ta):\n",
    "    y = ta.trans_block_distribution\n",
    "    if hasattr(ta,\"name\"):\n",
    "        print(\"{} 区块中交易数量\".format(ta.name))\n",
    "    print(\"mean: {}, std: {}, max: {}, min: {}\\n\".format(y.mean(), y.std(), y.max(), y.min()))\n",
    "    # 横轴为序号\n",
    "    names = range(len(y))\n",
    "    plt.bar(names, y)\n",
    "\n",
    "def stats(ta):\n",
    "    print(\"Number of blocks: {}\".format(len(ta.trans_block_distribution)))\n",
    "    print(\"Average number of transaction in each block: {}\".format(ta.trans_block_distribution.mean()))\n",
    "    print(\"Average bytes of each block: {}\".format(ta.size_distribution.mean()))\n",
    "    print(\"Number of transactions: {}\".format(ta.getNumberOfRecord()))\n",
    "    print(\"Average TPS: {}\".format(ta.averageTPS()))\n",
    "    print(\"Duration /seconds: {}\".format(ta.getDuration()))\n",
    "    print(\"Average finish time /seconds: {}\".format(ta.avgHowLongItTakes()))\n",
    "    print(\"Average CTPS: {}\".format(ta.averageCTPS()))\n",
    "    print(\"Finish Duration /seconds: {}\".format(ta.getFinishedDuration()))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "===================================\n",
      "raft_server84_shimrecord_high_5.h5\n",
      "Number of blocks: 619\n",
      "Average number of transaction in each block: 80.77544426494346\n",
      "Average bytes of each block: 92146.58158319871\n",
      "Number of transactions: 50000\n",
      "Average TPS: 2340.6520373105554\n",
      "Duration /seconds: 21.361569\n",
      "Average finish time /seconds: 5.479564281\n",
      "Average CTPS: 1756.9586455507413\n",
      "Finish Duration /seconds: 28.458268\n",
      "===================================\n",
      "raft_server84_shim_high_5.h5\n",
      "Number of blocks: 619\n",
      "Average number of transaction in each block: 80.77544426494346\n",
      "Average bytes of each block: 54343.68497576737\n",
      "Number of transactions: 50000\n",
      "Average TPS: 2128.880192839077\n",
      "Duration /seconds: 23.486526\n",
      "Average finish time /seconds: 1.94422285\n",
      "Average CTPS: 1966.6364840410006\n",
      "Finish Duration /seconds: 25.424119\n"
     ]
    }
   ],
   "source": [
    "for k,v in ta_raft_5k.items():\n",
    "    if \"high\" in k:\n",
    "        print(\"===================================\")\n",
    "        print(k)\n",
    "        stats(v)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# y = ta.transaction_record_df[\"takes\"].dt.total_seconds()\n",
    "# print(\"mean: {}, std: {}, max: {}, min: {}\\n\".format(y.mean(), y.std(), y.max(), y.min()))\n",
    "# block = len(y) // 100\n",
    "# y = [np.mean(y[i * block:(i + 1) * block]) for i in range(100)]\n",
    "# plt.bar(range(len(y)), y,edgecolor=\"k\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# y = ta.transaction_record_df[\"takes\"].dt.total_seconds()\n",
    "# plt.hist(y, density=True,linewidth=\"1\",edgecolor=\"k\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [],
   "source": [
    "def print4TAInfo(ta4,low_or_high):\n",
    "    for k,v in ta4.items():\n",
    "        if low_or_high in k:\n",
    "            print(\"===================================\")\n",
    "            print(k)\n",
    "            oneThirdTakes(v)\n",
    "            print(\"Average number of transaction in each block: {}\".format(v.trans_block_distribution.mean()))\n",
    "            print(\"Average bytes of each block: {}\".format(v.size_distribution.mean()))\n",
    "            print(\"Finish Duration /seconds: {}\".format(v.getFinishedDuration()))\n",
    "    "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 低速"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## cfrd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "===================================\n",
      "cfrd_server84_shimrecord_low_5.h5\n",
      "start index: 16666\n",
      "end index: 33333\n",
      "mean: 0.06434595482090358, std: 0.09389818748308897, max: 0.5102490000000001, min: -0.027301000000000002\n",
      "\n",
      "Average number of transaction in each block: 26.26050420168067\n",
      "Average bytes of each block: 30810.26523109244\n",
      "Finish Duration /seconds: 89.223186\n",
      "===================================\n",
      "cfrd_server84_shim_low_5.h5\n",
      "start index: 16666\n",
      "end index: 33333\n",
      "mean: 0.05504889434211316, std: 0.10108139706148354, max: 0.5717960000000001, min: -0.02449\n",
      "\n",
      "Average number of transaction in each block: 21.331058020477816\n",
      "Average bytes of each block: 15242.421501706485\n",
      "Finish Duration /seconds: 83.762692\n"
     ]
    }
   ],
   "source": [
    "print4TAInfo(ta_cfrd_5k,\"low\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "===================================\n",
      "cfrd_server84_shimrecord_low_10.h5\n",
      "start index: 33333\n",
      "end index: 66666\n",
      "mean: 0.09110479263792638, std: 0.09995878802046163, max: 0.717642, min: 0.014175\n",
      "\n",
      "Average number of transaction in each block: 21.34471718249733\n",
      "Average bytes of each block: 25241.025186766274\n",
      "Finish Duration /seconds: 171.122262\n",
      "===================================\n",
      "cfrd_server84_shim_low_10.h5\n",
      "start index: 33333\n",
      "end index: 66666\n",
      "mean: 0.1019650631506315, std: 0.10708165396614953, max: 0.7506400000000001, min: 0.003696\n",
      "\n",
      "Average number of transaction in each block: 25.144581342720645\n",
      "Average bytes of each block: 17778.52904199145\n",
      "Finish Duration /seconds: 167.739732\n"
     ]
    }
   ],
   "source": [
    "print4TAInfo(ta_cfrd_10k,\"low\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "===================================\n",
      "cfrd_server84_shimrecord_low_20.h5\n",
      "start index: 66666\n",
      "end index: 133333\n",
      "mean: 0.11047956168719156, std: 0.13383968704598612, max: 0.8179510000000001, min: -0.014421000000000002\n",
      "\n",
      "Average number of transaction in each block: 28.530670470756064\n",
      "Average bytes of each block: 33382.712838801715\n",
      "Finish Duration /seconds: 367.917238\n",
      "===================================\n",
      "cfrd_server84_shim_low_20.h5\n",
      "start index: 66666\n",
      "end index: 133333\n",
      "mean: 0.09117983507582464, std: 0.10950597660693494, max: 0.752641, min: -0.010582000000000001\n",
      "\n",
      "Average number of transaction in each block: 25.435584382551188\n",
      "Average bytes of each block: 17972.177794734835\n",
      "Finish Duration /seconds: 345.870671\n"
     ]
    }
   ],
   "source": [
    "print4TAInfo(ta_cfrd_20k,\"low\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## raft"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "===================================\n",
      "raft_server84_shimrecord_low_5.h5\n",
      "start index: 16666\n",
      "end index: 33333\n",
      "mean: 0.006253780644387113, std: 0.009090040954800179, max: 0.11976600000000001, min: -0.002161\n",
      "\n",
      "Average number of transaction in each block: 6.137228427642077\n",
      "Average bytes of each block: 7583.271756474776\n",
      "Finish Duration /seconds: 87.305532\n",
      "===================================\n",
      "raft_server84_shim_low_5.h5\n",
      "start index: 16666\n",
      "end index: 33333\n",
      "mean: -0.011864411531769366, std: 0.011488748963108548, max: 0.11110900000000001, min: -0.018922\n",
      "\n",
      "Average number of transaction in each block: 6.066488716330988\n",
      "Average bytes of each block: 4664.010677020141\n",
      "Finish Duration /seconds: 80.705889\n"
     ]
    }
   ],
   "source": [
    "print4TAInfo(ta_raft_5k,\"low\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "===================================\n",
      "raft_server84_shimrecord_low_10.h5\n",
      "start index: 33333\n",
      "end index: 66666\n",
      "mean: 0.03478637515375155, std: 0.010749760095134923, max: 0.193084, min: 0.026268000000000003\n",
      "\n",
      "Average number of transaction in each block: 5.970862192500597\n",
      "Average bytes of each block: 7395.238774779078\n",
      "Finish Duration /seconds: 175.27357\n",
      "===================================\n",
      "raft_server84_shim_low_10.h5\n",
      "start index: 33333\n",
      "end index: 66666\n",
      "mean: 0.027318856448564483, std: 0.011076794240856395, max: 0.152703, min: 0.018145\n",
      "\n",
      "Average number of transaction in each block: 6.957005704744678\n",
      "Average bytes of each block: 5256.54125504383\n",
      "Finish Duration /seconds: 165.179722\n"
     ]
    }
   ],
   "source": [
    "print4TAInfo(ta_raft_10k,\"low\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "===================================\n",
      "raft_server84_shimrecord_low_20.h5\n",
      "start index: 66666\n",
      "end index: 133333\n",
      "mean: 0.004317104714476427, std: 0.010216238512411662, max: 0.19903900000000002, min: -0.004937\n",
      "\n",
      "Average number of transaction in each block: 5.888761299060743\n",
      "Average bytes of each block: 7302.5556046285665\n",
      "Finish Duration /seconds: 349.685261\n",
      "===================================\n",
      "raft_server84_shim_low_20.h5\n",
      "start index: 66666\n",
      "end index: 133333\n",
      "mean: -0.00034059497202513985, std: 0.014799952282642578, max: 0.185343, min: -0.008327000000000001\n",
      "\n",
      "Average number of transaction in each block: 5.7567209717345\n",
      "Average bytes of each block: 4458.8177997812445\n",
      "Finish Duration /seconds: 310.599289\n"
     ]
    }
   ],
   "source": [
    "print4TAInfo(ta_raft_20k,\"low\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 高速"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# crfd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "===================================\n",
      "cfrd_server84_shimrecord_high_5.h5\n",
      "start index: 16666\n",
      "end index: 33333\n",
      "mean: 10.748066720105598, std: 1.5817969388796849, max: 12.835384000000001, min: 7.377421000000001\n",
      "\n",
      "Average number of transaction in each block: 80.0\n",
      "Average bytes of each block: 91695.9808\n",
      "Finish Duration /seconds: 44.578528\n",
      "===================================\n",
      "cfrd_server84_shim_high_5.h5\n",
      "start index: 16666\n",
      "end index: 33333\n",
      "mean: 4.190615203995921, std: 0.4646861260542748, max: 5.017314000000001, min: 3.364266\n",
      "\n",
      "Average number of transaction in each block: 80.0\n",
      "Average bytes of each block: 54255.9536\n",
      "Finish Duration /seconds: 37.803476\n"
     ]
    }
   ],
   "source": [
    "print4TAInfo(ta_cfrd_5k,\"high\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "===================================\n",
      "cfrd_server84_shimrecord_high_10.h5\n",
      "start index: 33333\n",
      "end index: 66666\n",
      "mean: 24.517828740227404, std: 4.493104451414475, max: 30.764869, min: 16.725912\n",
      "\n",
      "Average number of transaction in each block: 80.12820512820512\n",
      "Average bytes of each block: 91841.37580128205\n",
      "Finish Duration /seconds: 104.807847\n",
      "===================================\n",
      "cfrd_server84_shim_high_10.h5\n",
      "start index: 33333\n",
      "end index: 66666\n",
      "mean: 12.882948369453695, std: 1.9336630543298254, max: 16.371401000000002, min: 9.660992\n",
      "\n",
      "Average number of transaction in each block: 80.12820512820512\n",
      "Average bytes of each block: 54341.3717948718\n",
      "Finish Duration /seconds: 85.342019\n"
     ]
    }
   ],
   "source": [
    "print4TAInfo(ta_cfrd_10k,\"high\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "===================================\n",
      "cfrd_server84_shimrecord_high_20.h5\n",
      "start index: 66666\n",
      "end index: 133333\n",
      "mean: 160.78986043205785, std: 168.39385259995416, max: 530.45718, min: 31.825309\n",
      "\n",
      "Average number of transaction in each block: 80.16032064128257\n",
      "Average bytes of each block: 91878.1751503006\n",
      "Finish Duration /seconds: 696.434319\n",
      "===================================\n",
      "cfrd_server84_shim_high_20.h5\n",
      "start index: 66666\n",
      "end index: 133333\n",
      "mean: 31.394503718916404, std: 6.647335951235484, max: 44.20315, min: 20.748286\n",
      "\n",
      "Average number of transaction in each block: 80.16032064128257\n",
      "Average bytes of each block: 54363.14468937876\n",
      "Finish Duration /seconds: 176.095174\n"
     ]
    }
   ],
   "source": [
    "print4TAInfo(ta_cfrd_20k,\"high\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## raft"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "===================================\n",
      "raft_server84_shimrecord_high_5.h5\n",
      "start index: 16666\n",
      "end index: 33333\n",
      "mean: 6.404788964180716, std: 0.9991386911173401, max: 7.757722, min: 4.5677460000000005\n",
      "\n",
      "Average number of transaction in each block: 80.77544426494346\n",
      "Average bytes of each block: 92146.58158319871\n",
      "Finish Duration /seconds: 28.458268\n",
      "===================================\n",
      "raft_server84_shim_high_5.h5\n",
      "start index: 16666\n",
      "end index: 33333\n",
      "mean: 2.0900486926261475, std: 0.14852364414425004, max: 2.327629, min: 1.772623\n",
      "\n",
      "Average number of transaction in each block: 80.77544426494346\n",
      "Average bytes of each block: 54343.68497576737\n",
      "Finish Duration /seconds: 25.424119\n"
     ]
    }
   ],
   "source": [
    "print4TAInfo(ta_raft_5k,\"high\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "===================================\n",
      "raft_server84_shimrecord_high_10.h5\n",
      "start index: 33333\n",
      "end index: 66666\n",
      "mean: 15.261582694296944, std: 2.493414073741919, max: 18.501701, min: 10.748721000000002\n",
      "\n",
      "Average number of transaction in each block: 80.90614886731392\n",
      "Average bytes of each block: 92294.78721682848\n",
      "Finish Duration /seconds: 64.074066\n",
      "===================================\n",
      "raft_server84_shim_high_10.h5\n",
      "start index: 33333\n",
      "end index: 66666\n",
      "mean: 7.782383807728078, std: 1.258960951057511, max: 9.919298000000001, min: 5.685344000000001\n",
      "\n",
      "Average number of transaction in each block: 80.90614886731392\n",
      "Average bytes of each block: 54430.69902912621\n",
      "Finish Duration /seconds: 49.977778\n"
     ]
    }
   ],
   "source": [
    "print4TAInfo(ta_raft_10k,\"high\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "===================================\n",
      "raft_server84_shimrecord_high_20.h5\n",
      "start index: 66666\n",
      "end index: 133333\n",
      "mean: 29.117870541527292, std: 5.838047105744574, max: 36.18325, min: 18.174323\n",
      "\n",
      "Average number of transaction in each block: 80.93889113719142\n",
      "Average bytes of each block: 92332.31849453662\n",
      "Finish Duration /seconds: 119.696309\n",
      "===================================\n",
      "raft_server84_shim_high_20.h5\n",
      "start index: 66666\n",
      "end index: 133333\n",
      "mean: 13.112760972355138, std: 2.44519229006814, max: 17.808736, min: 9.302835\n",
      "\n",
      "Average number of transaction in each block: 80.97165991902834\n",
      "Average bytes of each block: 54474.6963562753\n",
      "Finish Duration /seconds: 99.971529\n"
     ]
    }
   ],
   "source": [
    "print4TAInfo(ta_raft_20k,\"high\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
